import request from "@/utils/request";

const api_name = "/comment";

export default {
  loadComments(articleId) {
    return request({
      url: `${api_name}/loadComments`,
      method: "get",
      params: {
        articleId: articleId,
      },
    });
  },
  addComment(forumCommentVo) {
    return request({
      url: `${api_name}/addComment`,
      method: "post",
      data: forumCommentVo,
    });
  },
  doLikeComment(commentId) {
    return request({
      url: `${api_name}/doLike`,
      method: "post",
      params: {
        commentId: commentId,
      },
    });
  },
};
